package com.music.action.authority;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Result;

import com.music.action.BaseAction;
import com.music.action.BaseKey;

/**
 * 退出相关
 * @author LFSenior
 *
 */
@SuppressWarnings("serial")
public class LoginOutAction extends BaseAction{
	@Action(value="loginout",results={@Result(name="loginout",type="json",params={"root","reParam"})})
	public String loginOut(){
		/**
		 * 登出
		 */
		try {
			session.remove(BaseKey.LOGIN_USER);
			reParam.put("state", "T");
		} catch (Exception e) {
			reParam.put("state", "F");
		}
		return "loginout";
	}
}
